//
//  TestObject+CategoryTest.m
//  JustForTest
//
//  Created by YaoZhaofeng on 16/1/23.
//  Copyright © 2016年 YaoZhaofeng. All rights reserved.
//

#import "CategoryObject+CategoryTest.h"
#import <objc/runtime.h>

static const void *propertyKey = &propertyKey;

@implementation CategoryObject (CategoryTest)


- (void)setCategoryProperty:(NSString *)categoryProperty{
    objc_setAssociatedObject(self, propertyKey, categoryProperty, OBJC_ASSOCIATION_COPY_NONATOMIC);
}


- (NSString *)categoryProperty{
    return objc_getAssociatedObject(self, propertyKey);
}

- (void)doSomething{
    
    NSLog(@"do something at Category1");
}

@end
